package com.mei.allpowerfuladapter;

import android.content.Context;

import com.mei.allpowerfuladapter.bean.Bean;
import com.mei.allpowerfuladapter.utils.CommonAdapter;
import com.mei.allpowerfuladapter.utils.ViewHolder;

import java.util.List;

/**
 * Created by Administrator on 2015/9/23.
 */
public class MyCommonAdapter extends CommonAdapter<Bean> {

    public MyCommonAdapter(Context context, List<Bean> datas) {
        super(context, datas,R.layout.list_view_item);
    }

    @Override
    public void convert(ViewHolder holder, Bean bean) {
        //        ((TextView)holder.getView(R.id.tv_title)).setText(bean.getTitle());
        //        ((TextView)holder.getView(R.id.tv_desc)).setText(bean.getTitle());
        //        ((TextView)holder.getView(R.id.tv_time)).setText(bean.getTitle());
        //        ((TextView)holder.getView(R.id.tv_phone)).setText(bean.getTitle());
        holder.setText(R.id.tv_title, bean.getTitle())
                .setText(R.id.tv_desc, bean.getTitle())
                .setText(R.id.tv_time, bean.getTitle())
                .setText(R.id.tv_phone, bean.getTitle());
    }
}
